﻿using System.Collections.Generic;

using VSTalk.Engine.Core.Event.Events;

namespace VSTalk.Engine.Core.Event.Transactions
{
    public class ClientAddedTran : ITransactionUnit<ClientAddedEvent>
    {
        public IList<object> Transact(ClientAddedEvent unit)
        {
            return new List<object>
            {
                Convert(unit)
            };
        }

        private ConnectClientEvent Convert(ClientAddedEvent e)
        {
            return new ConnectClientEvent
            {
                ClientId = e.ClientId
            };
        }
    }
}